package DataLayer;

import java.sql.ResultSet;
import java.sql.Statement;

import Model.User;
import Model.Transactie;

public class DaoTransaction extends DaoConnection {
	private static DaoTransaction single;
	
	public void insertTransaction(Transactie T){
		try {
			openConn();
			Statement stmt = getConn().createStatement();
			String sql = "insert into Transaction(transactionID, amount, fromAccount, toAccount) values('" 
					+ T.getTransactionId()
					+ "', '"
					+ T.getTransactionAmount()
					+ "','"
					+ T.getTransactionPeriod()
					+ "','"
					+ T.getTransactionDescription()
					+ "','"
					+ T.getTransType()
					+"')";
		} catch (Exception e) {
			// TODO: handle exception  
		}
	}
	
	
	
	
	
	public static DaoTransaction getInstance(){
		if(single == null){
			single = new DaoTransaction();
		}
		return single;
	}
	
	public static void selfDestroy(){
		single = null;
	}
}
